Component({
  externalClasses: ['qts-class', 'qts-class-mask', 'qts-class-header'],

  options: {
    multipleSlots: true
  },

  properties: {
    showCancel: {
      type: Boolean,
      value: true
    },
    visible: {
      type: Boolean,
      value: false
    },
    actions: {
      type: Array,
      value: []
    },
    maskClosable: {
      type: Boolean,
      value: true
    },
    head:{
      type: Array,
      value: []
    }
  },

  methods: {
    handleClickMask() {
      if (!this.data.maskClosable) return;
      this.handleClickCancel();
    },
    preventTouchmove() {},
    handleClickItem(e) {
      const dataset = e.currentTarget.dataset || ''
      this.triggerEvent('click', dataset)
      this.triggerEvent('cancel');
    },

    handleClickCancel() {
      this.triggerEvent('cancel');
    }
  }
})